#include <iostream>
using namespace std;
void main()
{
long long int *pa=new long long int ();
long long int *pb=new long long int ();
cout<<"Enter first number:  ";
cin>>*pa;
*pb=*pa;
for(int i=*pb-1;i>1;i--)
{
	*pa=*pa*i;
	
}
cout<<*pa<<endl;
delete pa;
delete pb;
}